-- 配方写在这里
-- recipes_filter.lua中查看分类

-- 本mod自己的科技靠近指定建筑或者物品解锁
AddPrototyperDef("sw_shadowwoven_tower", { -- 光影交织塔
    icon_atlas = "images/sw_crafting_menu_icons.xml",
    icon_image = "station_sw_shadowwoven_tower.tex",
    is_crafting_station = true,
    action_str = "SW_INTERWEAVE",
    filter_text = STRINGS.UI.CRAFTING_FILTERS.SW_INTERWEAVE,
})

-- 岩浆精华液
AddRecipe2(
    "sw_magma_essence",
    -- 配方
    {
        Ingredient("lavae_egg", 1),         -- 岩浆虫卵
        Ingredient("butterflywings", 5),    -- 蝴蝶翅膀
        Ingredient("messagebottleempty", 1) -- 空瓶子
    },
    TECH.MAGIC_THREE,
    {
        numtogive = 10, -- 一次制作10个
    },
    {
        "MAGIC",   -- 魔法分类
        "COOKING", -- 食物分类
        "SW",      -- 光影交织分类
    }
)

-- 启迪碎屑
AddRecipe2(
    "sw_enlight_shard",
    {
        Ingredient("alterguardianhatshard", 1),
        Ingredient("purebrilliance", 3),
    },
    TECH.SW_SHADOWWOVEN_TECH_ONE,
    {
        nounlock = true,
        numtogive = 5,
    },
    {
        "SW",
    }
)

-- 暗影碎屑
AddRecipe2(
    "sw_shadow_shard",
    {
        Ingredient("sw_shadow_fragment", 1),
        Ingredient("horrorfuel", 3),
    },
    TECH.SW_SHADOWWOVEN_TECH_ONE,
    {
        nounlock = true,
        numtogive = 5,
    },
    {
        "SW",
    }
)

-- 交织光影
AddRecipe2(
    "sw_woven",
    {
        Ingredient("sw_enlight_shard", 3),
        Ingredient("sw_shadow_shard", 3),
        Ingredient("refined_dust", 1),
    },
    TECH.SW_SHADOWWOVEN_TECH_ONE,
    {
        nounlock = true,
        no_deconstruction = true, -- 不可分解
    },
    {
        "SW",
    }
)

-- 镇狱石
AddRecipe2(
    "sw_infernal_stone_item",
    {
        Ingredient("alterguardianhatshard", 1),
        Ingredient("sw_shadow_fragment", 1),
    },
    TECH.SW_SHADOWWOVEN_TECH_ONE,
    {
        nounlock = true,
    },
    {
        "SW",
    }
)

-- 分解暗影之冕
AddDeconstructRecipe(
    "sw_shadow_crown",
    {
        Ingredient("sw_shadow_fragment", 5),
    }
)

-- 猪草弹药包
AddRecipe2(
    "sw_pigweed_pouch",
    {
        Ingredient("sw_piggymimosa", 10), -- 晗猪草
        Ingredient("silk", 2),            -- 蜘蛛丝
    },
    TECH.MAGIC_THREE,
    {},
    {
        "WEAPONS",
        "MAGIC",
        "SW",
    }
)

-- 光影交织塔
AddRecipe2(
    "sw_shadowwoven_tower",
    { Ingredient("lunar_forge_kit", 1), Ingredient("shadow_forge_kit", 1) },
    TECH.CELESTIAL_THREE,
    {
        placer = "sw_shadowwoven_tower_placer", -- 建造预览
        min_spacing = 1.5,                      -- 放置间隔
    },
    {
        "PROTOTYPERS", -- 制作台分类
        "STRUCTURES",  -- 建筑分类
        "SW",
    }
)

-- 猪器人
AddRecipe2(
    "sw_pigbot",
    {
        Ingredient("sw_piggymimosa", 1),  -- 晗猪草
        Ingredient("wagpunk_bits", 2),    -- 废料
        Ingredient("opalpreciousgem", 1), -- 彩虹宝石
    },
    TECH.LOST,
    {},
    {
        "SW",
    }
)

-- 猪猪炮
AddRecipe2(
    "sw_pig_cannon",
    {
        Ingredient("sw_piggymimosa", 5),  -- 晗猪草
        Ingredient("wagpunk_bits", 5),    -- 废料
        Ingredient("refined_dust", 5),    -- 尘土块
        Ingredient("opalpreciousgem", 5), -- 彩虹宝石
    },
    TECH.MAGIC_THREE,
    {
        no_deconstruction = true, -- 不可分解
    },
    {
        "WEAPONS",
        "MAGIC",
        "SW",
    }
)
